<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>完善用户信息</title>
    <link rel="stylesheet" href="../css/layui.css">
    <link rel="stylesheet" href="../css/layuimini.css">
    <style>
        /* 让页面容器全屏并居中对齐 */
        body, html {
            height: 100%;
            margin: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            background-color: #f2f2f2; /* 背景色可以根据需要调整 */
        }

        .form-container {
            padding: 20px;
            background-color: #fff;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            border-radius: 8px;
            width: 100%;
            max-width: 500px;
        }
    </style>
</head>
<body>

<!-- 完善用户信息表单 -->
<div class="form-container">
    <form class="layui-form" action="updateUserInfo" method="post">
        <div class="layui-form-item">
            <label class="layui-form-label">用户名</label>
            <div class="layui-input-block">
                <input type="text" name="username" required lay-verify="required" placeholder="请输入用户名" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">邮箱</label>
            <div class="layui-input-block">
                <input type="email" name="email" required lay-verify="required|email" placeholder="请输入邮箱" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">手机号码</label>
            <div class="layui-input-block">
                <input type="text" name="phone" placeholder="请输入手机号" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">地址</label>
            <div class="layui-input-block">
                <input type="text" name="address" placeholder="请输入地址" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit>提交</button>
            </div>
        </div>
    </form>
</div>

<!-- 引入Layui和Layuimini JS库 -->
<script src="../js/layui.js"></script>
<script src="../js/layuimini.js"></script>

<script>
    layui.use(['form'], function(){
        var form = layui.form;

        // 监听表单提交
        form.on('submit', function(){
            return true;  // Allow the default form submission
        });
    });
</script>

</body>
</html>
